package com.tianji.learning.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.domian.vo.LearningLessonVO;
import com.tianji.learning.domian.vo.LearningPlanPageVO;
import com.tianji.learning.domian.vo.LearningPlanVO;
import com.tianji.learning.entity.LearningLesson;

import java.util.List;

/**
 * <p>
 * 学生课程表 服务类
 * </p>
 *
 * @author 东哥
 * @since 2024-03-15
 */
public interface ILearningLessonService extends IService<LearningLesson> {

    /**
     * 1、添加课程到课表（Day2 - 课堂）
     * @param userId 用户ID
     * @param courseIds 课程ID集合
     */
    void addUserLessons(Long userId, List<Long> courseIds);

    /**
     * 2、分页查询我的课表（Day2 - 课堂）
     * @param pageQuery
     * @return
     */
    PageDTO<LearningLessonVO> queryMyLessonsPage(PageQuery pageQuery);

    LearningLessonVO queryMyCurrentLesson();

    Long isLessonValid(Long courseId);

    LearningLessonVO getBystatus(Long courseId);

    Integer countLearningLessonByCourse(Long courseId);

    void deleteCartByUserAndCourseIds(Long userId, List<Long> courseIds);

    LearningLesson queryByUserAndCourseId(Long user, Long courseId);

    void createLearningPlan(Long courseId, Integer freq);

    LearningPlanPageVO queryMyPlans(PageQuery pageQuery);

    void deleteCourseFromLesson(Long userId, Long courseId);
}
